const vscode = require('vscode');

class Condition {
    constructor (key, value) {
        this.key = key;
        this.value = value;
        vscode.commands.executeCommand('setContext', this.key, this.value);
    }

    update (value) {
        this.value = value;
        vscode.commands.executeCommand('setContext', this.key, value);
    }

    value () {
        return this.value;
    }
}

module.exports = {
    Condition
};
